package com.qingfeng.activiti.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qingfeng.activiti.mapper.TobereadMapper;
import com.qingfeng.activiti.service.ITobereadService;
import com.qingfeng.entity.QueryRequest;
import com.qingfeng.entity.activiti.Toberead;
import com.qingfeng.entity.system.Area;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @ProjectName TobereadServiceImpl
 * @author Administrator
 * @version 1.0.0
 * @Description 流程待阅
 * @createTime 2022/12/24 0024 11:59
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class TobereadServiceImpl extends ServiceImpl<TobereadMapper, Toberead> implements ITobereadService {

    /**
     * @title findListPage
     * @description 查询数据分页列表
     * @author Administrator
     * @updateTime 2022/12/22 0022 21:48
     */
    public IPage<Toberead> findListPage(Toberead toberead, QueryRequest request){
        Page<Toberead> page = new Page<>(request.getPageNum(), request.getPageSize());
        return this.baseMapper.findListPage(page, toberead);
    }

    /**
     * 查询数据列表
     * @param toberead
     * @return
     */
    public List<Toberead> findList(Toberead toberead){
        return this.baseMapper.findList(toberead);
    }


}